import Login from '@/components/Login.vue'
import Vue from 'vue'
import VueRouter from 'vue-router'
import aboutus from '../components/aboutuus.vue'


Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', component: Login },
  { path: '/aboutus', component: aboutus },
  {
    path: '/main', component: () => import('../components/main.vue'),
    children: [
      { path: '/', redirect: '/home' },
      { path: '/home', component: () => import('../components/home.vue') },
      { path: '/manager', component: () => import('../components/areaManager.vue') },
      { path: '/shop', component: () => import('../components/shop.vue')},
      { path: '/courier', component: () => import('../components/courier.vue') },
      { path: '/goods', component: () => import('../components/goods.vue') },
      { path: '/domestic', component: () => import('../components/domestic.vue') }
]
  },

]

const router = new VueRouter({
  routes
})

export default router
